<?php
declare(strict_types=1);
namespace App\Controller\Api;

use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use App\Controller\AbstractController;
use App\Service\HttpServer\HttpConcurrenceRequestService;

/**
 * @Controller(prefix="/ConcurrenceRequest")
 * 并发请求服务
 */
class ConcurrenceRequestController extends AbstractController
{
    /**
     * 并发请求
     * @RequestMapping(path="addMultiRequest", methods="POST")
     * @return string[]
     */
    public function addMultiRequest(RequestInterface $request,HttpConcurrenceRequestService $service) 
    {
        return $service->addMultiRequest($request->getParsedBody());
    }
}